Dynomotion

Group: DynoMotion Message: 1811 From: bradodarb Date: 9/21/2011
Subject: interpreter setup

Hello Tom,

   I am working on implmenting the interpreter functionality into my app and I seem to be running into some issues.  I'm sure I am doing something wrong, but I cant seem to see the forrest for the trees right now.

The high-level view of two the problems are:

1) I cannot see the axis dest or pos values change

2) I keep receiving the Buffer Underflow error even if I set the Lookahead to 2000  (I am using the supplied ear.ngc file for testing)

3) When trying to run the program from the KMotion executive application, I recieve-

Error Extracting Version Information from file

C:\KMotion425\KMotion\Release\DSPKFLOP.out

 

 

I have verified the axes are mapped (0,1,2,-1,-1,-1) and enabled.

 

On the axis level these are the values::

X Y Z
P=1.000000 P=1.000000 P=1.000000
I=0.000000 I=0.000000 I=0.000000
D=0.000000 D=0.000000 D=0.000000
Vel=100.000000 Vel=100.000000 Vel=100.000000
Accel=700.000000 Accel=1500.000000 Accel=1500.000000
Jerk=50.000000 Jerk=50.000000 Jerk=50.000000
FFVel=0.000000 FFVel=0.000000 FFVel=0.000000
FFAccel=0.000000 FFAccel=0.000000 FFAccel=0.000000
MaxI=0.000000 MaxI=0.000000 MaxI=0.000000
MaxErr=0.000000 MaxErr=0.000000 MaxErr=0.000000
MaxOutput=0.000000 MaxOutput=0.000000 MaxOutput=0.000000
DeadBandGain=0.000000 DeadBandGain=0.000000 DeadBandGain=0.000000
DeadBandRange=0.000000 DeadBandRange=0.000000 DeadBandRange=0.000000
BacklashAmount=0.000000 BacklashAmount=0.000000 BacklashAmount=0.000000
BacklashRate=0.000000 BacklashRate=0.000000 BacklashRate=0.000000
InputMode=0 InputMode=0 InputMode=0
BacklashMode=0 BacklashMode=0 BacklashMode=0
OutputMode=6 OutputMode=6 OutputMode=6
InputChan0=0 InputChan0=1 InputChan0=2
InputChan1=0 InputChan1=1 InputChan1=2
OutputChan0=8 OutputChan0=11 OutputChan0=13
OutputChan1=0 OutputChan1=11 OutputChan1=13
MasterAxis=0 MasterAxis=0 MasterAxis=0
LimitSwitch=1514000f LimitSwitch=1716001f LimitSwitch=1918001f

 

The Interpreter values are as follows::

 

BreakAngle 20
Look Ahead 20
Collinear Tolerance 0.0001
Corner Tolerance 0.0002
Facet Angle 0.5
X Accel 10
X Velocity 16
X CPI 1000
Y Accel 10
Y Velocity 16
Y CPI 1000
Z Accel 10
Z Velocity 16
Z CPI 1000

 

I have tried all manner of Accels/Velocities/CPI's and still recive the underflow.

I re loaded the firmware many times and still no joy

 

Any thoughts on what I may be overlooking?

 

Thank you,

 

Brad Murry

 

 

Group: DynoMotion Message: 1812 From: bradodarb Date: 9/21/2011
Subject: Re: interpreter setup
OK- I posted 3 problems, and also I should mention that I do seet the dest values move during jogging and move/relative move operations.

-Brad
--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
>
> Hello Tom,
>
> I am working on implmenting the interpreter functionality into my app
> and I seem to be running into some issues. I'm sure I am doing
> something wrong, but I cant seem to see the forrest for the trees right
> now.
>
> The high-level view of two the problems are:
>
> 1) I cannot see the axis dest or pos values change
>
> 2) I keep receiving the Buffer Underflow error even if I set the
> Lookahead to 2000 (I am using the supplied ear.ngc file for testing)
>
> 3) When trying to run the program from the KMotion executive
> application, I recieve-
>
> Error Extracting Version Information from file
>
> C:\KMotion425\KMotion\Release\DSPKFLOP.out
>
>
>
>
>
> I have verified the axes are mapped (0,1,2,-1,-1,-1) and enabled.
>
>
>
> On the axis level these are the values::
>
> X Y Z P=1.000000 P=1.000000 P=1.000000 I=0.000000 I=0.000000
> I=0.000000 D=0.000000 D=0.000000 D=0.000000 Vel=100.000000
> Vel=100.000000 Vel=100.000000 Accel=700.000000 Accel=1500.000000
> Accel=1500.000000 Jerk=50.000000 Jerk=50.000000 Jerk=50.000000
> FFVel=0.000000 FFVel=0.000000 FFVel=0.000000 FFAccel=0.000000
> FFAccel=0.000000 FFAccel=0.000000 MaxI=0.000000 MaxI=0.000000
> MaxI=0.000000 MaxErr=0.000000 MaxErr=0.000000 MaxErr=0.000000
> MaxOutput=0.000000 MaxOutput=0.000000 MaxOutput=0.000000
> DeadBandGain=0.000000 DeadBandGain=0.000000 DeadBandGain=0.000000
> DeadBandRange=0.000000 DeadBandRange=0.000000 DeadBandRange=0.000000
> BacklashAmount=0.000000 BacklashAmount=0.000000 BacklashAmount=0.000000
> BacklashRate=0.000000 BacklashRate=0.000000 BacklashRate=0.000000
> InputMode=0 InputMode=0 InputMode=0 BacklashMode=0 BacklashMode=0
> BacklashMode=0 OutputMode=6 OutputMode=6 OutputMode=6 InputChan0=0
> InputChan0=1 InputChan0=2 InputChan1=0 InputChan1=1 InputChan1=2
> OutputChan0=8 OutputChan0=11 OutputChan0=13 OutputChan1=0
> OutputChan1=11 OutputChan1=13 MasterAxis=0 MasterAxis=0 MasterAxis=0
> LimitSwitch=1514000f LimitSwitch=1716001f LimitSwitch=1918001f
>
>
>
> The Interpreter values are as follows::
>
>
>
> BreakAngle 20 Look Ahead 20 Collinear Tolerance 0.0001 Corner
> Tolerance 0.0002 Facet Angle 0.5 X Accel 10 X Velocity 16 X CPI
> 1000 Y Accel 10 Y Velocity 16 Y CPI 1000 Z Accel 10 Z
> Velocity 16 Z CPI 1000
>
>
>
> I have tried all manner of Accels/Velocities/CPI's and still recive the
> underflow.
>
> I re loaded the firmware many times and still no joy
>
>
>
> Any thoughts on what I may be overlooking?
>
>
>
> Thank you,
>
>
>
> Brad Murry
>
Group: DynoMotion Message: 1813 From: Tom Kerekes Date: 9/21/2011
Subject: Re: interpreter setup
Hi Brad,
 
Regarding:
 
#1 the "Position" is the encoder feedback so unless those are connected and you actually have motion I wouldn't expect them to change.
 
#2 the Axis are probably being disabled causing the Buffer Underflow Error.  Run KMotion.exe and check if the axes are actually enabled and if there is any message on the Console such as Limit Switch Axis Disabled.
 
I see in your parameters you have MasterAxis set to 0.  So all your axes will be slaved to axis 0 (including axis 0).  Set the MasterAxis to -1 to disable slaving.
 
#3 sounds like a problem with your installation.  Is that needed file actually there?
 
The Jerk values are very low - as a general rule set them 10X the Acceleration Value.
 
Unless you have the Corner rounding patch - set the Corner tolerance to 0 to defeat Corner Rounding.
 
Hope some of this helps :}
 
TK
 

Group: DynoMotion Message: 1814 From: bradodarb Date: 9/23/2011
Subject: Re: interpreter setup
Thanks Tom,

Turns out I had some fatfingerd code going on in my Interpreter data initialization and some of the params were not being set while others were being set incorrectly. I no longer receive the buffer underflow.

I have [Dest] positions changing now(DefineCS was not getting called because I had no AxisGroups defined, so I now have Interpreter defining the CS as well).

I think #3 is due to my modifications for the MainPathRoot. I changed this to make things more portable, maybe I should look into making things more flexible there and throw in some default values so it works with existing stuff(like your executive suite, etc...)



One other thing(notice I said "other" not "last" ;) )...


I have my code editor line position going to the InterpreterStatusCallback returned lineno +1

It moves along the file fine.


I am also dropping points to my OpenGL graphics control to show tool path progress, it receives points from the traverse and feed callbacks from the Interpreter's CCoordMotion in much the same manner as you are doing in KMotionCNC.

What I am noticing is that I seem to be out of sync with the actual progress of the machine. At times, I burn thru the file and my graphics are drawn and then I have to wait a couple minutes for the buffer to run dry and the program to actually complete.




I recall previous converations about the callbacks being issued when segments are added to the Tplanner, and I am not after exact synchronization, but I would like to take it from a couple minutes to a couple seconds if possible.

How do you recommend keeping things a little closer to reality?

-Brad Murry





--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Brad,
>  
> Regarding:
>  
> #1 the "Position" is the encoder feedback so unless those are connected and you actually have motion I wouldn't expect them to change.
>  
> #2 the Axis are probably being disabled causing the Buffer Underflow Error.  Run KMotion.exe and check if the axes are actually enabled and if there is any message on the Console such as Limit Switch Axis Disabled.
>  
> I see in your parameters you have MasterAxis set to 0.  So all your axes will be slaved to axis 0 (including axis 0).  Set the MasterAxis to -1 to disable slaving.
>  
> #3 sounds like a problem with your installation.  Is that needed file actually there?
>  
> The Jerk values are very low - as a general rule set them 10X the Acceleration Value.
>  
> Unless you have the Corner rounding patch - set the Corner tolerance to 0 to defeat Corner Rounding.
>  
> Hope some of this helps :}
>  
> TK
>  
>
> From: bradodarb <bradodarb@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, September 21, 2011 10:10 PM
> Subject: [DynoMotion] interpreter setup
>
>  
> Hello Tom,
>    I am working on implmenting the interpreter functionality into my app and I seem to be running into some issues.  I'm sure I am doing something wrong, but I cant seem to see the forrest for the trees right now.
> The high-level view of two the problems are:
> 1) I cannot see the axis dest or pos values change
> 2) I keep receiving the Buffer Underflow error even if I set the Lookahead to 2000  (I am using the supplied ear.ngc file for testing)
> 3) When trying to run the program from the KMotion executive application, I recieve-
> Error Extracting Version Information from file
> C:\KMotion425\KMotion\Release\DSPKFLOP.out
>  
>  
> I have verified the axes are mapped (0,1,2,-1,-1,-1) and enabled.
>  
> On the axis level these are the values::
> X Y Z
> P=1.000000 P=1.000000 P=1.000000
> I=0.000000 I=0.000000 I=0.000000
> D=0.000000 D=0.000000 D=0.000000
> Vel=100.000000 Vel=100.000000 Vel=100.000000
> Accel=700.000000 Accel=1500.000000 Accel=1500.000000
> Jerk=50.000000 Jerk=50.000000 Jerk=50.000000
> FFVel=0.000000 FFVel=0.000000 FFVel=0.000000
> FFAccel=0.000000 FFAccel=0.000000 FFAccel=0.000000
> MaxI=0.000000 MaxI=0.000000 MaxI=0.000000
> MaxErr=0.000000 MaxErr=0.000000 MaxErr=0.000000
> MaxOutput=0.000000 MaxOutput=0.000000 MaxOutput=0.000000
> DeadBandGain=0.000000 DeadBandGain=0.000000 DeadBandGain=0.000000
> DeadBandRange=0.000000 DeadBandRange=0.000000 DeadBandRange=0.000000
> BacklashAmount=0.000000 BacklashAmount=0.000000 BacklashAmount=0.000000
> BacklashRate=0.000000 BacklashRate=0.000000 BacklashRate=0.000000
> InputMode=0 InputMode=0 InputMode=0
> BacklashMode=0 BacklashMode=0 BacklashMode=0
> OutputMode=6 OutputMode=6 OutputMode=6
> InputChan0=0 InputChan0=1 InputChan0=2
> InputChan1=0 InputChan1=1 InputChan1=2
> OutputChan0=8 OutputChan0=11 OutputChan0=13
> OutputChan1=0 OutputChan1=11 OutputChan1=13
> MasterAxis=0 MasterAxis=0 MasterAxis=0
> LimitSwitch=1514000f LimitSwitch=1716001f LimitSwitch=1918001f
>  
> The Interpreter values are as follows::
>  
> BreakAngle 20
> Look Ahead 20
> Collinear Tolerance 0.0001
> Corner Tolerance 0.0002
> Facet Angle 0.5
> X Accel 10
> X Velocity 16
> X CPI 1000
> Y Accel 10
> Y Velocity 16
> Y CPI 1000
> Z Accel 10
> Z Velocity 16
> Z CPI 1000
>  
> I have tried all manner of Accels/Velocities/CPI's and still recive the underflow.
> I re loaded the firmware many times and still no joy
>  
> Any thoughts on what I may be overlooking?
>  
> Thank you,
>  
> Brad Murry
>  
>  
>
Group: DynoMotion Message: 1815 From: Tom Kerekes Date: 9/23/2011
Subject: Re: interpreter setup
Hi Brad,
 
That is what the TPLookahead setting is for.  It will block the Interpreter if that much time of motion is buffered ahead in KFLOP.   
 
TK

Group: DynoMotion Message: 1816 From: bradodarb Date: 9/23/2011
Subject: Re: interpreter setup
That was my first inkling before I wrote that last post and I changed it down to 5 but it behaved the same way...

I powecycled it and now it seems to behave normally.


Thanks Tom

-Brad



--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
> Thanks Tom,
>
> Turns out I had some fatfingerd code going on in my Interpreter data initialization and some of the params were not being set while others were being set incorrectly. I no longer receive the buffer underflow.
>
> I have [Dest] positions changing now(DefineCS was not getting called because I had no AxisGroups defined, so I now have Interpreter defining the CS as well).
>
> I think #3 is due to my modifications for the MainPathRoot. I changed this to make things more portable, maybe I should look into making things more flexible there and throw in some default values so it works with existing stuff(like your executive suite, etc...)
>
>
>
> One other thing(notice I said "other" not "last" ;) )...
>
>
> I have my code editor line position going to the InterpreterStatusCallback returned lineno +1
>
> It moves along the file fine.
>
>
> I am also dropping points to my OpenGL graphics control to show tool path progress, it receives points from the traverse and feed callbacks from the Interpreter's CCoordMotion in much the same manner as you are doing in KMotionCNC.
>
> What I am noticing is that I seem to be out of sync with the actual progress of the machine. At times, I burn thru the file and my graphics are drawn and then I have to wait a couple minutes for the buffer to run dry and the program to actually complete.
>
>
>
>
> I recall previous converations about the callbacks being issued when segments are added to the Tplanner, and I am not after exact synchronization, but I would like to take it from a couple minutes to a couple seconds if possible.
>
> How do you recommend keeping things a little closer to reality?
>
> -Brad Murry
>
>
>
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Brad,
> >  
> > Regarding:
> >  
> > #1 the "Position" is the encoder feedback so unless those are connected and you actually have motion I wouldn't expect them to change.
> >  
> > #2 the Axis are probably being disabled causing the Buffer Underflow Error.  Run KMotion.exe and check if the axes are actually enabled and if there is any message on the Console such as Limit Switch Axis Disabled.
> >  
> > I see in your parameters you have MasterAxis set to 0.  So all your axes will be slaved to axis 0 (including axis 0).  Set the MasterAxis to -1 to disable slaving.
> >  
> > #3 sounds like a problem with your installation.  Is that needed file actually there?
> >  
> > The Jerk values are very low - as a general rule set them 10X the Acceleration Value.
> >  
> > Unless you have the Corner rounding patch - set the Corner tolerance to 0 to defeat Corner Rounding.
> >  
> > Hope some of this helps :}
> >  
> > TK
> >  
> >
> > From: bradodarb <bradodarb@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wednesday, September 21, 2011 10:10 PM
> > Subject: [DynoMotion] interpreter setup
> >
> >  
> > Hello Tom,
> >    I am working on implmenting the interpreter functionality into my app and I seem to be running into some issues.  I'm sure I am doing something wrong, but I cant seem to see the forrest for the trees right now.
> > The high-level view of two the problems are:
> > 1) I cannot see the axis dest or pos values change
> > 2) I keep receiving the Buffer Underflow error even if I set the Lookahead to 2000  (I am using the supplied ear.ngc file for testing)
> > 3) When trying to run the program from the KMotion executive application, I recieve-
> > Error Extracting Version Information from file
> > C:\KMotion425\KMotion\Release\DSPKFLOP.out
> >  
> >  
> > I have verified the axes are mapped (0,1,2,-1,-1,-1) and enabled.
> >  
> > On the axis level these are the values::
> > X Y Z
> > P=1.000000 P=1.000000 P=1.000000
> > I=0.000000 I=0.000000 I=0.000000
> > D=0.000000 D=0.000000 D=0.000000
> > Vel=100.000000 Vel=100.000000 Vel=100.000000
> > Accel=700.000000 Accel=1500.000000 Accel=1500.000000
> > Jerk=50.000000 Jerk=50.000000 Jerk=50.000000
> > FFVel=0.000000 FFVel=0.000000 FFVel=0.000000
> > FFAccel=0.000000 FFAccel=0.000000 FFAccel=0.000000
> > MaxI=0.000000 MaxI=0.000000 MaxI=0.000000
> > MaxErr=0.000000 MaxErr=0.000000 MaxErr=0.000000
> > MaxOutput=0.000000 MaxOutput=0.000000 MaxOutput=0.000000
> > DeadBandGain=0.000000 DeadBandGain=0.000000 DeadBandGain=0.000000
> > DeadBandRange=0.000000 DeadBandRange=0.000000 DeadBandRange=0.000000
> > BacklashAmount=0.000000 BacklashAmount=0.000000 BacklashAmount=0.000000
> > BacklashRate=0.000000 BacklashRate=0.000000 BacklashRate=0.000000
> > InputMode=0 InputMode=0 InputMode=0
> > BacklashMode=0 BacklashMode=0 BacklashMode=0
> > OutputMode=6 OutputMode=6 OutputMode=6
> > InputChan0=0 InputChan0=1 InputChan0=2
> > InputChan1=0 InputChan1=1 InputChan1=2
> > OutputChan0=8 OutputChan0=11 OutputChan0=13
> > OutputChan1=0 OutputChan1=11 OutputChan1=13
> > MasterAxis=0 MasterAxis=0 MasterAxis=0
> > LimitSwitch=1514000f LimitSwitch=1716001f LimitSwitch=1918001f
> >  
> > The Interpreter values are as follows::
> >  
> > BreakAngle 20
> > Look Ahead 20
> > Collinear Tolerance 0.0001
> > Corner Tolerance 0.0002
> > Facet Angle 0.5
> > X Accel 10
> > X Velocity 16
> > X CPI 1000
> > Y Accel 10
> > Y Velocity 16
> > Y CPI 1000
> > Z Accel 10
> > Z Velocity 16
> > Z CPI 1000
> >  
> > I have tried all manner of Accels/Velocities/CPI's and still recive the underflow.
> > I re loaded the firmware many times and still no joy
> >  
> > Any thoughts on what I may be overlooking?
> >  
> > Thank you,
> >  
> > Brad Murry
> >  
> >  
> >
>